package cn.com.utt.unms.vo;

import java.sql.Timestamp;
import java.text.SimpleDateFormat;

import cn.com.utt.unms.pojo.EventLog;

public class EventLogInfo {
	private long id;
	private String sn;
	private String type;
	private String content;
//	private String stamp;
	private Timestamp stamp;
	private String deviceName;
	
	private long nerworkId;
	private String group;
	
	public long getId() {
		return id;
	}
	public void setId(long id) {
		this.id = id;
	}
	public String getSn() {
		return sn;
	}
	public void setSn(String sn) {
		this.sn = sn;
	}
	public String getType() {
		return type;
	}
	public void setType(String type) {
		this.type = type;
	}
	public String getContent() {
		return content;
	}
	public void setContent(String content) {
		this.content = content;
	}
	public String getStamp() {
		SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
		return formatter.format(stamp);
	}
	public void setStamp(Timestamp stamp) {
		this.stamp = stamp;
	}
	public String getDeviceName() {
		return deviceName;
	}
	public void setDeviceName(String deviceName) {
		this.deviceName = deviceName;
	}
	public long getNerworkId() {
		return nerworkId;
	}
	public void setNerworkId(long nerworkId) {
		this.nerworkId = nerworkId;
	}
	
	public String getGroup() {
		return group;
	}
	public void setGroup(String group) {
		this.group = group;
	}
	public void convert(EventLog eventLog) {
		this.id = eventLog.getId();
		this.sn = eventLog.getSn();
//		if(eventLog.getType()==1){
//			this.type="告警";
//		}else if(eventLog.getType()==2){
//			this.type="通知";
//		}else{
//			this.type="消息";
//		}
		this.content=eventLog.getContent();
		if(this.content==""||this.content==null){
			this.content="--";
		}
		this.stamp = eventLog.getStamp();
	}
	

}
